#include "Entry_impl.h"


CellIterImpl::CellIterImpl( CVIter cur, CVIter end )
	: m_iterCur(cur)
	, m_iterEnd(end)
{

}

CellIterImpl::CellIterImpl(CVIter end )
	: m_iterCur(end)
	, m_iterEnd(end)
{

}

bool CellIterImpl::Next()
{
	if(m_iterCur == m_iterEnd)
		return false;
	m_iterCur++;
	if(m_iterCur == m_iterEnd)
		return false;
	return true;
}

void CellIterImpl::Release()
{
	delete this;
}

Cell* CellIterImpl::GetCell()
{
	return *(m_iterCur);
}

bool CellIterImpl::operator==( const CellIter& rhs )
{
	const CellIterImpl* r = dynamic_cast<const CellIterImpl*>(&rhs);
	if(m_iterCur != r->m_iterCur)
		return true;
	return false;
}

bool CellIterImpl::operator!=( const CellIter& rhs )
{
	const CellIterImpl* r = dynamic_cast<const CellIterImpl*>(&rhs);
	if(m_iterCur != r->m_iterCur)
		return true;
	return false;
}
